import java.util.Scanner;

public class Demo2_7 {
    //递归求斐波那契数列的第 N 项
    public static int fib(int k) {
        if (k == 1 || k == 2) {
            return 1;
        }
        return fib(k - 1) + fib(k - 2);
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入要求的项数：");
        int n = scan.nextInt();
        int ret = fib(n);
        System.out.println(ret);
    }
}
